package com.heshj.graypublish.gateway;

/**
 * 创建一个 ThreadLocal ，存储当前的版本信息
 */
public class GrayscaleThreadLocalEnvironment {

    private static ThreadLocal<String> threadLocal = new ThreadLocal<>();

    public static void setCurrentEnvironment(String currentEnvironmentVsersion) {
        threadLocal.set(currentEnvironmentVsersion);
    }

    public static String getCurrentEnvironment() {
        return threadLocal.get();
    }

}
